| Visual Basic (Declaration) | |
|---|---|
Public Overloads Overrides Sub Write( _ ByVal buffer() As Byte, _ ByVal offset As Integer, _ ByVal size As Integer _ ) | |
| Visual Basic (Usage) | Copy Code |
|---|---|
Dim instance As TcpStream Dim buffer() As Byte Dim offset As Integer Dim size As Integer instance.Write(buffer, offset, size) | |
Parameters
- buffer
- The storage location of the data to be sent.
- offset
- The zero-based position in the buffer from which to begin writing from.
- size
- The exact number of bytes to write.
| Exception | Description |
|---|---|
| System.IO.IOException | Thrown when the stream is not Writeable. |
| System.ArgumentNullException.#ctor | Thrown when buffer is null. |
| System.ArgumentOutOfRangeException.#ctor | Thrown when the offset is less than zero or when size is less than or equal to zero. |
| System.ArgumentException.#ctor | Thrown when the (offset + size) > buffer.Length. |
Use the CanWrite property to determine whether the current instance supports writing.
Target Platforms: Microsoft .NET Framework 2.0